import * as types from '../mutation-types';
import { typeOf } from 'common/js/utils';

export default {
  [types.SET_TICKET](state, ticket) {
    if (typeOf(ticket) === 'string') state.ticket = ticket;
  },
  [types.SET_USERINFO](state, userInfo) {
    if (typeOf(userInfo) === 'object') state.userInfo = userInfo;
  },
};
